Skip to content

Feature: add support for 3d secure to PayPal Commerce Gateway #7858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 10, 2025

Conversation

jonwaldstein
Copy link
Contributor

@jonwaldstein jonwaldstein commented Apr 3, 2025

Resolves GIVE-2397

Description

This adds minimal support for 3d secure to the PayPal commerce gateway card fields api.

Affects

  • PayPal Commerce using card fields

Visuals

N/A

Testing Instructions

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@jonwaldstein jonwaldstein marked this pull request as ready for review April 7, 2025 16:33
const {orderID, liabilityShift} = data;
payPalOrderId = orderID

if (liabilityShift && !['POSSIBLE', 'YES'].includes(liabilityShift)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonwaldstein I was checking the link you shared in the PR description and couldn't see any response with "YES". Usually, they only return "Y" instead - check the attached screenshot.

Also, I can see in this other link that they said that "YES" is used for the liability_shift property, but as you can see in the screenshot, they API responses are using the "Y" instead.

So, I'm a bit confused about the allowed values here and wondering if we should include the "Y" on this array as well.

Thoughts?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glaubersilva good question! I chatted with our PayPal rep about this and they said we can simply use the liability_shift property to check for YES or POSSIBLE. However, as you pointed out there are a lot more responses we could check but that is completely up to what we want to support. To start, i'm happy to accept those simple values and reject the rest 😄

Copy link
Contributor

@glaubersilva glaubersilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonwaldstein Nice work! I just left a couple of comments related to minor changes.

In general, the code looks good to me, and it also seems to be working most of the time. I tested it with these testing credit cards:

image

The Visa worked well the three times I tested it, while Discover threw the INELIGIBLE_CARD_VENDOR error all three times I tried to use it. The Mastercard threw the Error with obtaining 3DS contingency error in one of the three times I tested it.

image

image

So, I think the error in the Mastercard was some random error from the PayPal API, but the Discover error is something persistent, and it makes me think that the PayPal docs is wrong, which does not surprise me. 😅

@jonwaldstein
Copy link
Contributor Author

@glaubersilva thanks for the thorough testing! just resolved your comments 😄

Copy link
Contributor

@glaubersilva glaubersilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonwaldstein Great work man! Ready to go. 🚀

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed QA tests

@jonwaldstein jonwaldstein merged commit f1b690d into epic/paypal-card-fields-api Apr 10, 2025
24 checks passed
@jonwaldstein jonwaldstein deleted the feature/paypal-3ds-secure branch April 10, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants